package o;

import android.content.Context;
import android.text.TextUtils;
import com.huawei.appgallery.assistantdock.base.externalaction.openviewaction.RemoteBuoyAction;
import com.huawei.gamebox.service.common.uikit.protocol.CardListActivityProtocol;
import com.huawei.gamebox.service.common.uikit.protocol.CardListActivityProtocol.Request;
import o.der.f;
import org.json.JSONException;
import org.json.JSONObject;

public class enn {
    private Context ˊ;

    public void ॱ(Context context, String str, String str2) {
        this.ˊ = context;
        String ˊ = ˊ(str2);
        if (!dof.ॱ(str) && !dof.ॱ(ˊ)) {
            ˎ(str, ˊ);
        }
    }

    private void ˎ(String str, String str2) {
        if (!TextUtils.isEmpty(str2)) {
            String ॱ = cju.ॱ(str2);
            if ("gss|campaign".equals(ॱ) || "gss|gifts".equals(ॱ) || str2.startsWith("gss|campaign_list")) {
                ˋ(str, str2);
            }
        }
    }

    private void ˋ(String str, String str2) {
        if ("cardlist_activity".equals(str)) {
            cjo cardListActivityProtocol = new CardListActivityProtocol();
            Request request = new Request();
            request.ˋ("G0020005");
            request.ˎ(str2);
            if ("gss|campaign".equals(cju.ॱ(str2)) || str2.startsWith("gss|campaign_list")) {
                request.ˏ("campaigntoawardevent");
            } else {
                request.ˏ("gifttoawardevent");
                request.ˏ(exp$e.ˏ);
                request.ॱ(exp$f.ॱᐝ);
            }
            request.ॱ(true);
            request.ˊ(f.ꞌॱ);
            request.ˋ(exp$e.ʼ);
            request.ˎ(exp$e.ˎ);
            cardListActivityProtocol.ˋ(request);
            cjk.ˎ().ˋ(this.ˊ, new cjm(str, cardListActivityProtocol));
        }
    }

    private String ˊ(String str) {
        String str2 = "";
        try {
            str2 = new JSONObject(str).getString(RemoteBuoyAction.REMOTE_BUOY_URI);
        } catch (JSONException e) {
            e.printStackTrace();
        }
        return str2;
    }
}
